package cz.ctu.guiproject.client.networking;

/**
 * 
 * @author tomas.buk
 */
public interface ClientNetworkAgent {

	/**
	 * Current connection state of the client.
	 */
	enum State {

		CONNECTED, DISCONNECTED;
	}

	void send(Object message);

	/**
	 * Inserts new ClientObserver object into the observer list.
	 * 
	 * @param o
	 *            Newly added ClientObserver
	 */
	void registerObserver(ClientNetworkObserver o);

	/**
	 * Removes particular CLientObserver from the observer list.
	 * 
	 * @param o
	 *            Client observer to be removed from the list
	 */
	void removeObserver(ClientNetworkObserver o);

	/**
	 * Informs all registered ClientObservers, that the event occured.
	 */
	void notifyObservers();

	/**
	 * Manually disconnects from server.
	 */
	void disableReconnect();
}
